# -*- coding: utf-8 -*-

################################################################################
## Form generated from reading UI file '下拉列表选择职位.ui'
##
## Created by: Qt User Interface Compiler version 5.15.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
import sys
from PySide2 import QtWidgets, QtCore


class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        if not MainWindow.objectName():
            MainWindow.setObjectName(u"MainWindow")
        MainWindow.resize(800, 600)
        self.centralwidget = QWidget(MainWindow)
        self.centralwidget.setObjectName(u"centralwidget")
        self.comboBox = QComboBox(self.centralwidget)
        self.comboBox.setObjectName(u"comboBox")
        self.comboBox.setGeometry(QRect(260, 150, 211, 51))

        # 为combobox添加职位列表
        list = ["总经理", "副总经理", "人事部经历", "财务部经理", "部门经理", "普通员工"]
        self.comboBox.addItems(list)
        # 设置combobox的信号与槽
        self.comboBox.currentIndexChanged.connect(self.showinfo)

        self.label = QLabel(self.centralwidget)
        self.label.setObjectName(u"label")
        self.label.setGeometry(QRect(260, 250, 231, 31))
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QMenuBar(MainWindow)
        self.menubar.setObjectName(u"menubar")
        self.menubar.setGeometry(QRect(0, 0, 800, 26))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QStatusBar(MainWindow)
        self.statusbar.setObjectName(u"statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)

        QMetaObject.connectSlotsByName(MainWindow)
    # setupUi

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"\u5728\u4e0b\u62c9\u5217\u8868\u4e2d\u9009\u62e9\u804c\u4f4d", None))
        self.label.setText(QCoreApplication.translate("MainWindow", u"\u60a8\u9009\u62e9\u7684\u804c\u4f4d\u662f\uff1a", None))
    # retranslateUi

    # 设置 标签 显示的内容
    def showinfo(self):
        self.label.setText("您选择的职位是："+self.comboBox.currentText())



if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())
